#include "rightframegroupbox.h"
#include <QPainter>
RightFrameGroupBox::RightFrameGroupBox(QWidget *parent)
    : QGroupBox(parent)
{
    this->setMouseTracking(true);
}

void RightFrameGroupBox::paintEvent(QPaintEvent *event)
{
    //首先需要获取到这个组件的大小
    QRect rect = this->rect();
    //然后获取左上角的位置
    int x = rect.x();
    int y = rect.y();

    QPainter painter(this);
    painter.setRenderHint(QPainter::Antialiasing);
    //设置画刷
    painter.setBrush(QColor(Qt::white));
    //设置画笔
    QPen pen;
    pen.setColor(QColor(240, 240, 240));
    pen.setWidth(1);
    painter.setPen(pen);

    //绘制右边的横线
    painter.drawLine(x + rect.width(), y, x + rect.width(), y + rect.height());
}
